import re
from datetime import datetime

# 定义字符串
str_date = "1.Dec"

pattern = r'^\d{1,2}\.[A-Za-z]{3}$'
if re.match(pattern, str_date):
    print("The date is valid.")
    # 将字符串转换为日期
    converted_date = datetime.strptime(str_date, "%d.%b")
    # 输出转换后的日期
    print("The converted date is:", converted_date)
else:
    print("The date is not valid.")